<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>部门调动管理</title>
<link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
	 <!-- 导航 -->
    <nav class="navbar navbar-default ">
      <div class="container">

        <!-- 小屏幕按钮和logo -->
        <div class="navbar-header">
          <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a href="#" class="navbar-brand">RM admin</a>
        </div>

        <!-- 小屏幕按钮和logo -->
        <!-- 导航 -->
        <div class="collapse navbar-collapse">
           <ul class=" nav navbar-nav ">
             <li class="active"><a href="#"><span class="glyphicon glyphicon-home"></span> &nbsp;后台首页</a></li>
             <li class="dropdown">
                <a href="organization.html" class="dropdown-toggle" data-toggle="dropdown">
                    组织结构管理
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath }/organization/department">部门管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/organization/job">岗位管理</a></li>

                </ul>
            </li>
            <li class="dropdown">
                <a href="organization.html" class="dropdown-toggle" data-toggle="dropdown">
                    人事信息管理
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath }/employee/enterAddEmployee">员工入职管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/period/enterPeriod/">试用期管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/dept/out">部门调动管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/post/out">岗位调动管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/leave/out">员工离职管理</a></li>

                </ul>
            </li>
             <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    员工信息中心
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath }/infoemployee/list">员工信息中心</a></li>


                </ul>
            </li>
            <li class="dropdown">
                <a href="organization.html" class="dropdown-toggle" data-toggle="dropdown">
                    报表管理
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath }/statement/newHire">新聘员工报表</a></li>
                    <li><a href="${pageContext.request.contextPath }/statement/departure">离职员工报表</a></li>
                    <li><a href="${pageContext.request.contextPath }/statement/deptTurn">部门调动员工报表</a></li>
                    <li><a href="${pageContext.request.contextPath }/statement/postTurn">岗位调动员工报表</a></li>
                </ul>
            </li>
           </ul>
           <ul class=" nav navbar-nav navbar-right ">
             <li class="dropdown">
                <a href="#" class=" dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">admin
                    <span class="caret"></span>
                </a>
            </li>

             <li><a href="http://localhost:8080/PMsystem/admin/exit"><span class="glyphicon glyphicon-off"></span>&nbsp;退出</a></li>
           </ul>
        </div>
        <!-- 导航 -->
      </div>
    </nav>
    <!-- 导航 -->

    <!-- 部门调动开始 -->
   <div class="container-fluid">
       <div class="row">
           <div class="col-md-2">
               <div class="panel-group" id="accordion">
                   <div class="panel panel-default">
                      <div class="panel-heading">
                          <h4 class="panel-title">
                              <a data-toggle="collapse" data-parent="#accordion"
                              href="#collapseThree" style="text-decoration: none;">
                            查询员工列表
                              </a>
                          </h4>
                      </div>
                      <div id="collapseThree" class="panel-collapse collapse in">
                          <div class="panel-body">
                              <table class="table table-hover">
                              <tbody>
                                <tr>
                                  <td style="border:none;"><a href="${pageContext.request.contextPath }/dept/out" style="text-decoration: none;">部门调动</a></td>
                                </tr>


                              </tbody>
                            </table>
                          </div>
                      </div>
                  </div>

                  <div class="panel panel-default">
                      <div class="panel-heading">
                          <h4 class="panel-title">
                              <a data-toggle="collapse" data-parent="#accordion"
                              href="#collapseThreeo" style="text-decoration: none;">
                            已调动部门员工查询
                              </a>
                          </h4>
                      </div>
                      <div id="collapseThreeo" class="panel-collapse collapse in">
                          <div class="panel-body">
                              <table class="table table-hover">
                              <tbody>
                                <tr>
                                  <td style="border:none;"><a href="${pageContext.request.contextPath }/dept/getDeptTranfer" style="text-decoration: none;">已调动部门员工查询</a></td>
                                </tr>
                              </tbody>
                            </table>
                          </div>
                      </div>
                  </div>

              </div>
           </div>

           <!-- 主体内容 -->
           <div class="col-sm-10">
           <div class="panel panel-info">
              <div class="panel-heading">
                  <h3 class="panel-title">调动部门员工查询</h3>
              </div>
              <div class="panel-body">
                  <form class="form-inline" role="form" action="${pageContext.request.contextPath }/dept/getByRequire" method="POST">
                     <div class="input-group">
                        <span class="input-group-addon">开始日期</span>
                        <input type="date" class="form-control" name="begin" value="2018-07-01">
                    </div>--
                    <div class="input-group">
                        <span class="input-group-addon">结束日期</span>
                        <input type="date" class="form-control" name="end" value="2018-07-31">
                    </div>--
                    <div class="input-group">
                        <span class="input-group-addon">员工编号</span>
                        <input type="text" class="form-control" name="emp_id">
                    </div>
                    <br><br>
                    <div class="input-group">
                        <span class="input-group-addon">员工姓名</span>
                        <input type="text" class="form-control" style="width: 170px;" name="emp_name">
                    </div>--
                    <div class="input-group">
                        <span class="input-group-addon">调转方式</span>
                        <select class="form-control" style="width: 170px;" name="type">
                        <option value=""></option>
                        <option>主动调动</option>
                        <option>被动调动</option>
                        <option>数据录入错误</option>
                      </select>
                      <span class="input-group-btn">
                              <button type="submit" class="btn btn-info">提交</button>
                      </span>
                    </div>
                  </form>
              </div>
          </div>
          <div class="panel panel-success">
              <div class="panel-heading">
                  <h3 class="panel-title">调动部门员工</h3>
              </div>
              <div class="panel-body">
                    <table class="table table-hover">

                        <thead>
                          <tr>
                            <td>编号</td>
                            <td>员工编号</td>
                            <td>员工姓名</td>
                            <td>调动前部门</td>
                            <td>调动后部门</td>
                            <td>调转类型</td>
                            <td>调转原因</td>
                            <td>备注</td>
                            <td>调转日期</td> 
                          </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${deptTurn }" var="deptTurn">
                         <tr>
                            <td>${deptTurn.dt_id }</td>
                            <td>${deptTurn.employees.emp_id}</td>
                            <td>${deptTurn.employees.emp_name }</td>
                            <td>${deptTurn.dt_dept_f }</td>
                            <td>${deptTurn.dt_dept_a }</td>
                            <td>${deptTurn.dt_type }</td>
                            <td>${deptTurn.dt_reason }</td>
                            <td>${deptTurn.dt_remark }</td>
                            <td>${deptTurn.dt_date }</td>                       
                          </tr>
                        </c:forEach>
                         
                        </tbody>
                      </table>
                    
              </div>
          </div>
           


    </div>
    <!-- 主体内容结束 -->
  </div>
</div>
<!-- 部门调动结束 -->

<script src="<%=basePath%>js/jquery-3.2.1.min.js"></script>   
<script src="<%=basePath%>js/bootstrap.min.js"></script>
</body>
</html>